gdouble x,
gdouble y,
GtkListBox *box);
+static void gtk_list_box_multipress_gesture_stopped (GtkGestureMultiPress *gesture,
+ GtkListBox *box);
static void gtk_list_box_update_row_styles (GtkListBox *box);
static void gtk_list_box_update_row_style (GtkListBox *box,
G_CALLBACK (gtk_list_box_multipress_gesture_pressed), box);
g_signal_connect (priv->multipress_gesture, "released",
G_CALLBACK (gtk_list_box_multipress_gesture_released), box);
+ g_signal_connect (priv->multipress_gesture, "stopped",
+ G_CALLBACK (gtk_list_box_multipress_gesture_stopped), box);
g_signal_connect (box, "notify::parent", G_CALLBACK (gtk_list_box_parent_cb), NULL);
*/
g_object_ref (box);
+g_print ("released\n");
if (priv->active_row != NULL &&
priv->active_row == gtk_list_box_get_row_at_y (box, y))
{
if (priv->active_row)
{
- gtk_widget_unset_state_flags (GTK_WIDGET (priv->active_row),
- GTK_STATE_FLAG_ACTIVE);
+ gtk_widget_unset_state_flags (GTK_WIDGET (priv->active_row), GTK_STATE_FLAG_ACTIVE);
priv->active_row = NULL;
}
g_object_unref (box);
}
+static void
+gtk_list_box_multipress_gesture_stopped (GtkGestureMultiPress *gesture,
+ GtkListBox *box)
+{
+ GtkListBoxPrivate *priv = BOX_PRIV (box);
+
+g_print ("stopped\n");
+ if (priv->active_row)
+ {
+ gtk_widget_unset_state_flags (GTK_WIDGET (priv->active_row), GTK_STATE_FLAG_ACTIVE);
+ priv->active_row = NULL;
+ gtk_widget_queue_draw (GTK_WIDGET (box));
+ }
+}
+
static void
gtk_list_box_show (GtkWidget *widget)
{